package com.apes.fico.finance.respository;

import com.apes.fico.finance.model.gl.GLVoucherAuxiliary;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Map;

public interface GLVoucherAuxiliaryRepository extends CustomRepository<GLVoucherAuxiliary, String> {
    @Query("select new map(T.code as code,T.name as name) from GLVoucherAuxiliary T join T.accountingOperatingChartAuxiliary F where F.accAuxiliaryProject.id=:id and F.accOperatingChart.code=:code")
    List<Map<String, String>> findByAuxIdAndAccCode(@Param("id") String id, @Param("code") String code);
}
